<%= render 'fae/shared/index_header', title: "#{@klass_humanized.pluralize}" %>

<main class="content">

  <div class="collapsible-toggle">Open All</div>

  <div class="collapsible" id="first-table">
    <%= content_tag(:h3, "#{@klass_humanized.pluralize} (#{@items.length})") %>
    <table class="js-sort-row">
      <thead>
        <tr>
          <th class="th-sortable-handle"></th>
          <th>Name</th>
          <th class="-action-wide">Modified</th>
          <th>Extra Column</th>
          <th>Fourth Column</th>
          <th>Some number</th>
          <th class="-action" data-sorter="false"></th>
        </tr>
      </thead>

      <tbody>
        <% @items.each do |item| %>
          <tr id="<%= "#{@klass_singular}_#{item.id}" %>">
            <td class="sortable-handle">
              <span class="icon-sort"></span>
            </td>
            <td><%= link_to item.fae_display_field, edit_admin_event_path(item) %></td>
            <td><%= fae_date_format item.updated_at %></td>
            <td>Extra cell</td>
            <td>Fourth cell</td>
            <td>###</td>
            <td><%= fae_delete_button item %></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>

  <div class="collapsible">
    <%= content_tag(:h3, "#{@klass_humanized.pluralize} (#{@items.length})") %>
    <table class="js-sort-row">
      <thead>
        <tr>
          <th class="th-sortable-handle"></th>
          <th>Name</th>
          <th class="-action-wide">Modified</th>
          <th>Extra Column</th>
          <th>Fourth Column</th>
          <th>Some number</th>
          <th class="-action" data-sorter="false">Delete</th>
        </tr>
      </thead>

      <tbody>
        <% @items.each do |item| %>
          <tr id="<%= "#{@klass_singular}_#{item.id}" %>">
            <td class="sortable-handle">
              <span class="icon-sort"></span>
            </td>
            <td><%= link_to item.fae_display_field, edit_admin_event_path(item) %></td>
            <td><%= fae_date_format item.updated_at %></td>
            <td>Extra cell</td>
            <td>Fourth cell</td>
            <td>###</td>
            <td><%= fae_delete_button item %></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>

  <div class="collapsible">
    <%= content_tag(:h3, "#{@klass_humanized.pluralize} (#{@items.length})") %>
    <table class="js-sort-row">
      <thead>
        <tr>
          <th class="th-sortable-handle"></th>
          <th>Name</th>
          <th class="-action-wide">Modified</th>
          <th>Extra Column</th>
          <th>Fourth Column</th>
          <th>Some number</th>
          <th class="-action" data-sorter="false"></th>
        </tr>
      </thead>

      <tbody>
        <% @items.each do |item| %>
          <tr id="<%= "#{@klass_singular}_#{item.id}" %>">
            <td class="sortable-handle">
              <span class="icon-sort"></span>
            </td>
            <td><%= link_to item.fae_display_field, edit_admin_event_path(item) %></td>
            <td><%= fae_date_format item.updated_at %></td>
            <td>Extra cell</td>
            <td>Fourth cell</td>
            <td>###</td>
            <td><%= fae_delete_button item %></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>

  <div class="collapsible">
    <%= content_tag(:h3, "#{@klass_humanized.pluralize} (#{@items.length})") %>
    <table class="js-sort-row">
      <thead>
        <tr>
          <th class="th-sortable-handle"></th>
          <th>Name</th>
          <th class="-action-wide">Modified</th>
          <th>Extra Column</th>
          <th>Fourth Column</th>
          <th>Some number</th>
          <th class="-action" data-sorter="false"></th>
        </tr>
      </thead>

      <tbody>
        <% @items.each do |item| %>
          <tr id="<%= "#{@klass_singular}_#{item.id}" %>">
            <td class="sortable-handle">
              <span class="icon-sort"></span>
            </td>
            <td><%= link_to item.fae_display_field, edit_admin_event_path(item) %></td>
            <td><%= fae_date_format item.updated_at %></td>
            <td>Extra cell</td>
            <td>Fourth cell</td>
            <td>###</td>
            <td><%= fae_delete_button item %></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</main>
